using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MBMC.Dialogs
{
    public partial class CreateSky : Form
    {
        bool terrgenex;
        public CreateSky(bool terragenexists)
        {
            InitializeComponent();
            terrgenex = terragenexists;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            TerragenHelp th = new TerragenHelp();
            th.ShowDialog();
            this.Close();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            CreateSky cs = new CreateSky(terrgenex);
            cs.ShowDialog();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (terrgenex == true)
            {

                process1.StartInfo.FileName = Application.StartupPath + "/data/apps/terragen/terragen.exe";
                process1.Start();

            }
            else
            {
                MessageBox.Show("Terragen not installed");
                button1.Enabled = false;
            }
        }

        public void terrgenstart()
        {
                        if (terrgenex == true)
            {

                process1.StartInfo.FileName = Application.StartupPath + "/data/apps/terragen/terragen.exe";
                process1.Start();

            }
            else
            {
                MessageBox.Show("Terragen not installed");
                button1.Enabled = false;
            }
        }
    }
}